<?php


namespace app\adminapi\validate\user;


use app\common\validate\BaseValidate;


/**
 * openvpn控制器验证器
 * Class OpenvpnValidate
 * @package app\adminapi\validate\user
 */
class OpenvpnValidate extends BaseValidate
{

     /**
      * 设置校验规则
      * @var string[]
      */
    protected $rule = [
        'id' => 'require',
        'common_name' => 'require',
    ];


    /**
     * 参数描述
     * @var string[]
     */
    protected $field = [
        'id' => 'id',
        'common_name' => '用户名',
    ];


    /**
     * @notes 添加场景
     * @return OpenvpnValidate
     * @author likeadmin
     * @date 2024/07/04 15:15
     */
    public function sceneAdd()
    {
        return $this->only(['common_name','status']);
    }


    /**
     * @notes 编辑场景
     * @return OpenvpnValidate
     * @author likeadmin
     * @date 2024/07/04 15:15
     */
    public function sceneEdit()
    {
        return $this->only(['id','common_name','status']);
    }


    /**
     * @notes 删除场景
     * @return OpenvpnValidate
     * @author likeadmin
     * @date 2024/07/04 15:15
     */
    public function sceneDelete()
    {
        return $this->only(['id']);
    }


    /**
     * @notes 详情场景
     * @return OpenvpnValidate
     * @author likeadmin
     * @date 2024/07/04 15:15
     */
    public function sceneDetail()
    {
        return $this->only(['id']);
    }

}